package com.mzy.barber;

import java.awt.*;
import java.awt.Graphics;

import javax.swing.JPanel;

public class barberPanel extends JPanel implements Listener{

	private waitArea area;
	private barber b;
	private customer c;
	
	public barberPanel(waitArea area, barber b, customer c) {
		super();
		this.area = area;
		this.b = b;
		this.c = c;
	}

	public void display(waitArea area){
		this.area=area;
		this.repaint();
	}

	@Override
	protected void paintComponent(Graphics g) {
		// TODO Auto-generated method stub
		g.setColor(new Color(0xcfcfcf));
		g.fillRect(0, 0, 750, 400);
		this.area.drawMe(g);
	}

	public void barberWork(barber b) {
		// TODO Auto-generated method stub
		display(area);
	}

	public void customer(customer c) {
		// TODO Auto-generated method stub
		display(area);
	}
	
}
